<div class="box box-default">
  <div class="box-body">

    <form class="form-inline" #remindSearchForm="ngForm">
      <div class="box box-default">
        <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
          <button *ngIf="_.includes(menuResourceSet,'btn-NQDII-tx-detail')" type="button" class="btn btn-primary" (click)="showViewDetail()">
            <i class="fa fa-search"></i>查看明细</button>
          <button *ngIf="_.includes(menuResourceSet,'btn-NQDII-tx-sendRemind')" (click)="showSendRemind()" type="button" class="btn btn-primary">
            <i class="fa fa-search"></i>发送提醒</button>
          <button type="button" class="btn btn-box-tool pull-right" data-widget="collapse">
            <i class="fa fa-minus"></i>
          </button>
        </div>
        <div class="box-body">
          <div class="form-group col-lg-12" style="padding-left:0px !important;margin-bottom:8px;">
            <!-- <label class="control-label">指定是否有效：</label>
            <select class="form-control" [(ngModel)]="dataInfo.aa" name="aa">
              <option [value]="0">有效</option>
              <option [value]="1">无效</option>
            </select> -->
            <label class="control-label">批次号：</label>
            <input class="form-control" placeholder="批次号" #nBatchno="ngModel" [min]="0" digits type="text" [(ngModel)]="getBody.nBatchno"
              name="nBatchno">
            <label class="control-label">是否已发送：</label>
            <select class="form-control" [(ngModel)]="getBody.sSendFlag" name="sSendFlag">
              <option [value]="'N'" selected="selected">否</option>
              <option [value]="'Y'">是</option>
            </select>

          </div>
          <div class="form-group col-lg-4" style="padding-left:0px !important">
            <p *ngIf="nBatchno.errors?.digits" class="errorTip" style="padding-left:80px">请输入正整数</p>
          </div>
          <div class="form-group col-lg-12" style="padding-left:0px !important;">
            <label class="control-label">发起人：</label>
            <input class="form-control" placeholder="发起人" [(ngModel)]="getBody.sBeginOperatorZh" name="sBeginOperatorZh">
            <label class="control-label">最后审核人：</label>
            <input class="form-control" placeholder="最后审核人" [(ngModel)]="getBody.sCommitOperatorZh" name="sCommitOperatorZh">
            <button type="button" class="btn btn-primary" (click)="loadList()" [disabled]="nBatchno.errors?.digits">
              <i class="fa fa-search"></i>查询</button>
          </div>
        </div>
      </div>
    </form>
    <div style="overflow-x:scroll;width:100%">
      <table id="fixed-table" class="table table-bordered table-keep-line table-hover table-striped" style="margin-top:unset !important;">
        <thead>
          <tr>
            <th class="width-5">
              <div class="checkbox checkbox-primary">
                <input type="checkbox" id="isCheckedAll" [(ngModel)]="isCheckedAll" name="isCheckedAll" (ngModelChange)="checkedAll()">
                <label>
                </label>
              </div>
            </th>
            <th class="width-8">批次号</th>
            <th class="width-9">业务类型</th>
            <th class="width-9">发起人</th>
            <th class="width-9">最后审核人</th>
            <!-- <th class="width-10">复核日期</th> -->
            <th class="width-10">复核时间</th>
            <th class="width-10">是否已经发送</th>
            <!-- <th class="width-10">最后发送日期</th> -->
            <th class="width-10">最后发送时间</th>
            <th class="width-10">最后发送批次</th>
          </tr>
        </thead>
        <tr *ngFor="let item of listData">
          <td class="width-5">
            <div class="checkbox checkbox-primary">
              <input type="checkbox" name="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll()">
              <label>
              </label>
            </div>
          </td>
          <td class="width-8 short_name" [attr.title]="item.nBatchno">{{item.nBatchno}}</td>
          <td class="width-9 short_name" [attr.title]="item.sOprTypeZh">{{item.sOprTypeZh}}</td>
          <td class="width-9 short_name" [attr.title]="item.sBeginOperatorZh">{{item.sBeginOperatorZh}}</td>
          <td class="width-9 short_name" [attr.title]="item.sCommitOperatorZh">{{item.sCommitOperatorZh}}</td>
          <td class="width-10 short_name" [attr.title]="item.sShDate">{{item.sShDate}}</td>
          <td class="width-10 short_name" [attr.title]="item.sSendFlagZh">{{item.sSendFlagZh}}</td>
          <td class="width-10 short_name" [attr.title]="item.sLastSendDate">{{item.sLastSendDate}}</td>
          <td class="width-10 short_name" [attr.title]="item.nLastMsgBatchno">{{item.nLastMsgBatchno}}</td>
          <!-- <td class="short_name" [attr.title]="item.xx">{{item.xx}}</td> -->
          <!-- <td class="short_name" [attr.title]="item.xx">{{item.xx}}</td> -->
        </tr>
      </table>
    </div>
    <div class="box-footer clearfix" style="width:100%;">
      <app-pagination [currentPageNum]="listPageInfo.currentPageNum" [pagesShow]="" [totalPages]="listPageInfo.totalPages" (pageChanged)="pageNavigation($event)">
        <div class="pull-left pagination-detail" data-pagination-additional="true">
          <span class="pagination-info">
            当前显示第{{listPageInfo.startRow}}到第{{listPageInfo.endRow}}条，总共{{listPageInfo.total}}条，
          </span>
          <span class="page-list">
            每页记录
            <span class="btn-group dropup">
              <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                <span class="page-size">{{listPageInfo.pageSize}}</span>
                <span class="caret"></span>
              </button>
              <ul class="dropdown-menu" role="menu">
                <li *ngFor="let i of listPageInfo.pageList" role="menuitem" [class.active]="listPageInfo.pageSize === i" (click)="sizeChange(i)">
                  <a>{{i}}</a>
                </li>
              </ul>
            </span>
            条
          </span>
        </div>
      </app-pagination>
    </div>
  </div>
</div>

<!-- 查看明细modal -->
<div class="modal modal-detail" id="modal">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">批次明细</h4>
      </div>

      <div class="modal-body">
        <div class="row" style="margin-bottom:10px">
          <div class="col-md-12">
            <div class="box box-solid">
              <div class="box-header with-border">
                <h3 class="box-title">基本信息</h3>
              </div>
              <!-- /.box-header -->
              <div class="box-body">
                <div class="row">
                  <div class="col-md-2">批次号：</div>
                  <div class="col-md-2">{{detailInfo.nBatchno}}</div>
                  <div class="col-md-2">发起人：</div>
                  <div class="col-md-2">{{detailInfo.sBeginOperatorZh}}</div>
                  <div class="col-md-2">是否已发送：</div>
                  <div class="col-md-2">{{detailInfo.sSendFlagZh}}</div>
                  <div class="col-md-2" style="margin-top:10px">最后审核人：</div>
                  <div class="col-md-2" style="margin-top:10px">{{detailInfo.sCommitOperatorZh}}</div>
                  <!-- <div class="col-md-2" style="margin-top:10px">复核日期：</div>
                  <div class="col-md-2" style="margin-top:10px">2018-04-04</div> -->
                  <div class="col-md-2" style="margin-top:10px">复核时间：</div>
                  <div class="col-md-2" style="margin-top:10px">{{detailInfo.sShDate}}</div>
                </div>
              </div>

              <div class="box box-solid">
                <div class="box-header with-border">
                  <h3 class="box-title">本批次包含的条目</h3>
                </div>
                <div class="box-body">
                  <table class="table table-bordered table-hover">
                    <tr>
                      <th>序号</th>
                      <th>条目编号</th>
                      <th>风控条目属性</th>
                      <th>条款出处</th>
                      <th>文件名称</th>
                      <th>适用基金类别</th>
                    </tr>
                    <tr *ngFor="let item of detailData;let index = index">
                      <td class="short_name" [attr.title]="index+1">{{index+1}}</td>
                      <td class="short_name" [attr.title]="item.nNdId">{{item.nNdId}}</td>
                      <td class="short_name" [attr.title]="item.sItemType">{{item.sItemType}}</td>
                      <td class="short_name" [attr.title]="item.sFileSource">{{item.sFileSource}}</td>
                      <td class="short_name" [attr.title]="item.sFileName">{{item.sFileName}}</td>
                      <td class="short_name" [attr.title]="item.sFundType">{{item.sFundType}}</td>
                    </tr>
                  </table>
                </div>
              </div>
              <!-- /.box-body -->
            </div>
            <!-- /.box -->
          </div>
          <!-- ./col -->
        </div>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
        <!-- <button type="button" class="btn btn-primary" (click)="saveEntry()">
            <i class="fa fa-save"></i>保存</button> -->
      </div>
    </div>
  </div>
</div>
<!-- 查看明细modal end -->

<!-- 发送提醒modal -->
<div class="modal modal-detail" id="sendRemind">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="hideModal()" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">提醒窗口</h4>
      </div>

      <div class="modal-body">
        <div class="row" style="margin-bottom:10px">
          <div class="col-md-12">
            <div class="box-body">
              <form class="form-inline">
                <div class="box box-default">
                  <div class="form-divider col-lg-12 col-md-12 col-sm-12 col-xs-12" title="提醒信息">
                    <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
                      <div class="row">
                        <div class="col-md-2">
                          <label class="control-label">提醒人：</label>
                        </div>
                        <div class="col-md-10" style="margin-left:-25px;">
                          <div class="input-group">
                            <input class="form-control" placeholder="提交人" title="{{displayName}}" disabled [(ngModel)]="displayName" name="auditOpr">
                            <div class="input-group-addon" (click)="showSearchRemind()">
                              <i class="fa fa-search"></i>
                            </div>
                          </div>
                          <button class="btn btn-primary" (click)="setDefault()">设置默认</button>
                          <label style="vertical-align:center" for="sms">短信提醒：</label>
                          <div class="checkbox checkbox-primary">
                            <input type="checkbox" id="sms" [(ngModel)]="sSMSFlag" name="sSMSFlag">
                            <label></label>
                          </div>
                          <label style="vertical-align:center" for="email">邮件提醒：</label>
                          <div class="checkbox checkbox-primary">
                            <input type="checkbox" id="email" [(ngModel)]="sEmailFlag" name="sEmailFlag">
                            <label></label>
                          </div>
                        </div>
                      </div>

                    </div>
                    <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
                      <div class="row">
                        <div class="col-md-2">
                          <label class="control-label">标题：</label>
                        </div>
                        <div class="col-md-10" style="margin-bottom:10px;margin-left:-25px">

                          <input type="text" style="width:100%" maxlength="100" class="form-control" placeholder="标题" [(ngModel)]="auditContentBean.title" name="title">
                        </div>


                        <div class="col-md-2">
                          <label class="control-label">短信内容：</label>
                        </div>
                        <div class="col-md-10">
                          <textarea rows="5" style="width:100%;margin-left:-25px" maxlength="2000" [(ngModel)]="auditContentBean.sSMSContent" name="sSMSContent"></textarea>
                        </div>
                        <div class="col-md-2">
                          <label class="control-label">邮件内容：</label>
                        </div>
                        <div class="col-md-10">
                          <textarea rows="5" style="width:100%;margin-left:-25px" maxlength="2000" [(ngModel)]="auditContentBean.sEmailContent" name="sEmailContent"></textarea>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn btn-default pull-left" (click)="hideModal()">关闭</button>
        <button type="button" class="btn btn-primary pull-right" (click)="sendRemind()">发送</button>
      </div>
    </div>
  </div>

</div>

<!-- 查询提醒人、群组modal -->
<div class="modal modal-detail" id="remindSearchRemind">
  <div #remindSearchRemind></div>
</div>